#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 ff=unix ft=python
"""
@author: wuliang
@contact: garcia.wul@alibaba-inc.com
@date 2021/02/05 16:56
"""

import sys
import urllib.request

def check():
    try:
        handler = urllib.request.urlopen("http://127.0.0.1:8080/health")
        handler.read()
        handler.close()
    except Exception:
        sys.exit(1)
    else:
        sys.exit(0)

if __name__ == '__main__':
    check()
